package com.rk.kbk.model;

import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.rk.kbk.common.DateJsonDeserializer;
import com.rk.kbk.common.DateJsonSerializer;
import org.hibernate.annotations.GenericGenerator;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import javax.persistence.*;

/**
 * @PunishLog
 * @(punish_log)
 * @version : Ver 1.0
 */
@Entity
public class PunishLog implements Serializable {
	private static final long serialVersionUID = 1L;

	/**
	 * @备注:主键
	 * @字段:id BIGINT(19)
	 */
	@Id
	@GeneratedValue(strategy= GenerationType.IDENTITY)
	@GenericGenerator(name="auto-identity",strategy="identity")
	@Column(updatable = false, columnDefinition="BIGINT(19) COMMENT '主键'")
	private Long id;

	/**
	 * @备注:用户
	 * @字段:user BIGINT(19)
	 */
	@ManyToOne
	@JoinColumn(name="user", columnDefinition="BIGINT(19) COMMENT '用户'")
	private User us;

	/**
	 * @备注:处罚类型
	 * @字段:punish_type Integer(255)
	 */
	@Column(columnDefinition="Integer(255) COMMENT '处罚类型'")
	private Integer punishType;

	/**
	 * @备注:处罚金额
	 * @字段:punish_money Double(255)
	 */
	@Column(columnDefinition="Double(255) COMMENT '处罚金额'")
	private Double punishMoney;

	/**
	 * @备注:处罚天数
	 * @字段:punish_days Integer(255)
	 */
	@Column(columnDefinition="Integer(255) COMMENT '处罚天数'")
	private Integer punishDays;

	/**
	 * @备注:状态 0正常 1禁止
	 * @字段:status INT(10)
	 */
	@Column(columnDefinition="INT(10) COMMENT '状态 0正常 1禁止'")
	private Integer status;

	/**
	 * @备注:
	 * @字段:gmt_datetime DATETIME(19)
	 */
	@Column(updatable = false, columnDefinition="DATETIME(19) COMMENT ''")
	@JsonSerialize(using=DateJsonSerializer.class)
	@JsonDeserialize(using=DateJsonDeserializer.class)
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss" )
	private java.util.Date gmtDatetime = new java.util.Date();

	/**
	 * @备注:
	 * @字段:upt_datetime DATETIME(19)
	 */
	@Column(columnDefinition="DATETIME(19) COMMENT ''")
	@JsonSerialize(using=DateJsonSerializer.class)
	@JsonDeserialize(using=DateJsonDeserializer.class)
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss" )
	private java.util.Date uptDatetime = new java.util.Date();

	private java.lang.String punishName;//处罚名称

	public PunishLog(){
	}

	public PunishLog(
		Long id
	){
		this.id = id;
	}



	public void setId(Long id) {
		this.id = id;
	}

	public Long getId() {
		return this.id;
	}


	public void setUs(User us) {
		this.us = us;
	}

	public User getUs() {
		return this.us;
	}


	public Integer getPunishType() {
		return punishType;
	}

	public void setPunishType(Integer punishType) {
		this.punishType = punishType;
	}

	public Double getPunishMoney() {
		return punishMoney;
	}

	public void setPunishMoney(Double punishMoney) {
		this.punishMoney = punishMoney;
	}

	public Integer getPunishDays() {
		return punishDays;
	}

	public void setPunishDays(Integer punishDays) {
		this.punishDays = punishDays;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	public Integer getStatus() {
		return this.status;
	}


	public void setGmtDatetime(java.util.Date gmtDatetime) {
		this.gmtDatetime = gmtDatetime;
	}

	public java.util.Date getGmtDatetime() {
		return this.gmtDatetime;
	}


	public void setUptDatetime(java.util.Date uptDatetime) {
		this.uptDatetime = uptDatetime;
	}

	public java.util.Date getUptDatetime() {
		return this.uptDatetime;
	}

	public String getPunishName() {
		return punishName;
	}

	public void setPunishName(String punishName) {
		this.punishName = punishName;
	}
}
